(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/home/components/address-list-all-user/address-box" ], {
    "791c": function(e, n, a) {},
    "8feb": function(e, n, a) {
        a.r(n);
        var t = a("e604"), d = a.n(t);
        for (var i in t) [ "default" ].indexOf(i) < 0 && function(e) {
            a.d(n, e, function() {
                return t[e];
            });
        }(i);
        n.default = d.a;
    },
    "917a": function(e, n, a) {
        a.d(n, "b", function() {
            return t;
        }), a.d(n, "c", function() {
            return d;
        }), a.d(n, "a", function() {});
        var t = function() {
            var e = this, n = (e.$createElement, e._self._c, e.address.length), a = e.__map(e.sliceAddressPrev, function(n, a) {
                var t = e.__get_orig(n), d = e.setEmptyLight(n.index), i = e.descText(n.index), o = e.computedPointClass(n.index), u = e.swapItemClass(n.index), l = e.computedShowTag(n.index), s = e.hasName(n.index), r = e.nameText(n.index), c = e.hasName(n.index), m = e.descText(n.index), v = m ? e.descText(n.index) : null, g = e.computedShowCoupon(n.index);
                return {
                    $orig: t,
                    m0: d,
                    m1: i,
                    m2: o,
                    m3: u,
                    m4: l,
                    m5: s,
                    m6: r,
                    m7: c,
                    m8: m,
                    m9: v,
                    m10: g,
                    m11: g ? null : e.computedShowTag(n.index),
                    m12: e.computedShowClear(n.index),
                    g1: n.index === e.address.length - 1 && e.isNewUser && (e.address.length < 3 || e.data.swapIndex < e.address.length - 2),
                    m13: n.index > 0 && e.canEditAddress && e.computedShowSwap(n.index)
                };
            }), t = e.data.handleIndex >= 0 && !(e.data.handleIndex === e.address.length - 1 && e.data.deleting), d = e.address.length, i = e.descText(e.data.handleIndex), o = e.data.deleting && e.data.handleIndex === e.address.length - 1, u = e.swapItemClass(e.data.handleIndex), l = e.computedShowTag(e.data.handleIndex), s = e.computedShowCoupon(e.data.handleIndex), r = e.data.handleIndex > 0 && e.canEditAddress && e.computedShowSwap(e.data.handleIndex), c = e.data.handleIndex === e.address.length - 1 && e.data.deleting, m = e.address.length, v = e.descText(e.data.handleIndex), g = e.data.deleting && e.data.handleIndex === e.address.length - 1, p = e.swapItemClass(e.data.handleIndex), h = e.computedShowTag(e.data.handleIndex), f = e.computedShowCoupon(e.data.handleIndex), x = e.data.handleIndex > 0 && e.canEditAddress && e.computedShowSwap(e.data.handleIndex), _ = e.sliceAddressNext.length, I = e.address.length, w = e.__map(e.sliceAddressNext, function(n, a) {
                var t = e.__get_orig(n), d = e.setEmptyLight(n.index), i = e.descText(n.index), o = e.computedPointClass(n.index), u = e.swapItemClass(n.index), l = e.computedShowTag(n.index), s = e.hasName(n.index), r = e.nameText(n.index), c = e.hasName(n.index), m = e.descText(n.index), v = m ? e.descText(n.index) : null, g = e.computedShowCoupon(n.index) && e.data.handleIndex < 0;
                return {
                    $orig: t,
                    m24: d,
                    m25: i,
                    m26: o,
                    m27: u,
                    m28: l,
                    m29: s,
                    m30: r,
                    m31: c,
                    m32: m,
                    m33: v,
                    m34: g,
                    m35: g ? null : e.computedShowTag(n.index),
                    m36: e.computedShowClear(n.index),
                    g10: n.index === e.address.length - 1 && e.isNewUser && (e.address.length < 3 || e.data.swapIndex < e.address.length - 2),
                    m37: n.index > 0 && e.canEditAddress && e.computedShowSwap(n.index)
                };
            });
            e.$mp.data = Object.assign({}, {
                $root: {
                    g0: n,
                    l0: a,
                    g2: t,
                    g3: d,
                    m14: i,
                    g4: o,
                    m15: u,
                    m16: l,
                    m17: s,
                    m18: r,
                    g5: c,
                    g6: m,
                    m19: v,
                    g7: g,
                    m20: p,
                    m21: h,
                    m22: f,
                    m23: x,
                    g8: _,
                    g9: I,
                    l1: w
                }
            });
        }, d = [];
    },
    b907: function(e, n, a) {
        var t = a("791c");
        a.n(t).a;
    },
    e604: function(e, n, a) {
        (function(e) {
            var t = a("4ea4").default;
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var d = t(a("ded3")), i = a("fd0e"), o = a("665c"), u = a("05dc"), l = a("cee8"), s = a("493c"), r = t(a("2de2")), c = a("4ef0"), m = a("2639"), v = a("48b8"), g = a("aa79"), p = a("68d3"), h = {};
            h.props = {
                fromPage: {
                    type: String,
                    default: "home"
                },
                calculating: {
                    type: Boolean,
                    default: !1
                },
                isUserQuotation: {
                    type: Boolean,
                    default: !1
                },
                isNewUser: {
                    type: Boolean,
                    default: !1
                },
                otherInfo: {
                    type: Object,
                    default: function() {
                        return {
                            ads: {
                                bg: "",
                                bgLink: "",
                                title: "",
                                titleLink: ""
                            },
                            coupon: {
                                text: ""
                            },
                            addressTag: {
                                name: ""
                            },
                            maiDian: {
                                bg: {},
                                title: {}
                            }
                        };
                    }
                },
                styles: {
                    type: Object,
                    default: function() {
                        return {};
                    }
                },
                currentSceneId: {
                    type: Number,
                    default: 0
                }
            }, h.setup = function(n, a) {
                var t = (0, o.useStore)(), h = (0, o.useState)(), f = h.address, x = h.hasShowEndAddrTag, _ = h.selectedService, I = (0, 
                o.useGetters)(), w = I.isCanOrder, T = I.selectedVehicle, b = I.startAddress, S = I.commonStatisticsState, y = I.isLogined, A = n, C = a.emit, k = (0, 
                i.reactive)({
                    swapAnimationTime: 400,
                    scale: 0,
                    swapIndex: "",
                    clickRotate: !1,
                    closeEndTag: !1,
                    handleIndex: -1,
                    handleAddress: {},
                    animationItemHeight: 0,
                    adding: !1,
                    deleting: !1
                });
                (0, i.onMounted)(function() {
                    k.scale = t.state.systemInfo.scale || .5, (0, m.getCommonConfig)();
                });
                var N = (0, i.computed)(function() {
                    var e = A.styles, n = e.addressItemHeight, a = void 0 === n ? 104 : n, t = e.addressItemMarginTop, d = void 0 === t ? 16 : t, i = f.value.length, o = i * a + (i - 1) * d;
                    return k.adding && (o += a + d), k.deleting && (o -= a + d), o;
                }), E = (0, i.computed)(function() {
                    return A.styles.addressItemHeight + A.styles.addressItemMarginTop;
                }), M = (0, i.computed)(function() {
                    var e = k.handleIndex > 0 ? k.handleIndex : 0;
                    return f.value.slice(0, e).map(function(e, n) {
                        return (0, d.default)((0, d.default)({}, e), {}, {
                            index: n
                        });
                    });
                }), P = (0, i.computed)(function() {
                    var e = k.handleIndex > 0 ? k.deleting ? k.handleIndex + 1 : k.handleIndex : 0;
                    return f.value.slice(e).map(function(n, a) {
                        return (0, d.default)((0, d.default)({}, n), {}, {
                            index: a + e
                        });
                    });
                }), H = (0, i.computed)(function() {
                    return "home" === A.fromPage;
                }), O = (0, i.computed)(function() {
                    return function(e) {
                        return e === f.value.length - 1;
                    };
                }), U = (0, i.computed)(function() {
                    var e;
                    return null === (e = f.value) || void 0 === e ? void 0 : e.findIndex(function(e) {
                        return !e.name;
                    });
                }), j = (0, i.computed)(function() {
                    return function(e) {
                        if ("home" !== A.fromPage) return "";
                        return e === U.value ? "empty-light" : "";
                    };
                }), R = (0, i.computed)(function() {
                    return function(e) {
                        return X.value && "empty-light" === j.value(e) && !w.value && D.value.length < 2;
                    };
                }), L = (0, i.computed)(function() {
                    return function(e) {
                        if (e < 0) return "";
                        var n = f.value[e];
                        return n.name ? n.contacts_name || n.contacts_phone_no ? [ n.contacts_name, n.contacts_phone_no ].join(" ") : H.value ? "" : "未填写联系人" : "";
                    };
                }), $ = (0, i.computed)(function() {
                    return function(e) {
                        return 0 === e ? "load" : O.value(e) ? "unload" : "pass";
                    };
                }), B = ((0, i.computed)(function() {
                    return function(e) {
                        return 0 === e ? "装" : O.value(e) ? "卸" : "经";
                    };
                }), (0, i.computed)(function() {
                    return function(e) {
                        return e === k.swapIndex ? "swap-item-first" : e === k.swapIndex + 1 ? "swap-item-second" : "";
                    };
                })), D = (0, i.computed)(function() {
                    return f.value.filter(function(e) {
                        return e.name;
                    });
                }), J = (0, i.computed)(function() {
                    return function(e) {
                        return e === U.value && D.value.length < 2 && !g.isMiniMode.value ? "估价" : "";
                    };
                }), Q = (0, i.computed)(function() {
                    return function(e) {
                        var n;
                        return !(e < 0 || null === (n = f.value[e]) || void 0 === n || !n.name);
                    };
                }), F = (0, i.computed)(function() {
                    return k.handleAddress.name || "输入途经点".concat(J.value(k.handleIndex));
                }), G = (0, i.computed)(function() {
                    var e = k.handleAddress;
                    return e.name ? e.contacts_name || e.contacts_phone_no ? [ e.contacts_name, e.contacts_phone_no ].join(" ") : H.value ? "" : "未填写联系人" : "";
                }), V = (0, i.computed)(function() {
                    return function(e) {
                        var n, a, t;
                        if (e < 0) return "";
                        var d, i, o, u, l = f.value[e], s = f.value.length - 1;
                        return l.name ? l.name + (l.house_number ? "(".concat(l.house_number, ")") : "") : e === s && !l.name && (2 === (null === (n = f.value) || void 0 === n ? void 0 : n.length) && null !== (a = f.value) && void 0 !== a && null !== (t = a[0]) && void 0 !== t && t.name || g.isMiniMode.value) && function(e) {
                            return "homePage" === e && (0, c.getCurrentRoute)() === (null === r.default || void 0 === r.default ? void 0 : r.default.homeUrl);
                        }("homePage") ? g.isMiniMode.value && null !== (d = p.miniModeConfig.value) && void 0 !== d && d.end_address_tip ? null === (i = p.miniModeConfig.value) || void 0 === i ? void 0 : i.end_address_tip : "输入卸货地" + J.value(e) : l.name ? void 0 : g.isMiniMode.value && null !== (o = p.miniModeConfig.value) && void 0 !== o && o.start_address_tip && 0 === e ? null === (u = p.miniModeConfig.value) || void 0 === u ? void 0 : u.start_address_tip : "输入" + (e > 0 ? e === s ? "卸货地" : "途经点" : "装货地") + J.value(e);
                    };
                }), W = (0, i.computed)(function() {
                    return function(e) {
                        var n, a, t, d, i;
                        return y.value && (null === (n = A.otherInfo) || void 0 === n || null === (a = n.addressTag) || void 0 === a ? void 0 : a.name) && O.value(e) && (null === (t = f.value) || void 0 === t || null === (d = t[0]) || void 0 === d ? void 0 : d.name) && !(null !== (i = f.value[f.value.length - 1]) && void 0 !== i && i.name) && x.value && !k.closeEndTag && !X.value && D.value.length < 2;
                    };
                }), q = (0, i.computed)(function() {
                    return function(e) {
                        var n, a;
                        return A.isNewUser ? e > 0 && (null === (n = f.value) || void 0 === n ? void 0 : n.length) > 2 && e < (null === (a = f.value) || void 0 === a ? void 0 : a.length) - 1 : e > 0 && f.value.length > 2;
                    };
                }), z = (0, i.computed)(function() {
                    return !A.isUserQuotation || "home" === A.fromPage;
                }), K = (0, i.computed)(function() {
                    return function(e) {
                        return e > 0;
                    };
                }), X = (0, i.computed)(function() {
                    var e, n, a = (null !== (e = null === (n = A.otherInfo) || void 0 === n ? void 0 : n.coupon) && void 0 !== e ? e : {}).text;
                    return void 0 === a ? "" : a;
                });
                function Y() {
                    var e = f.value.length;
                    if (10 === e) return (0, l.$toast)({
                        title: "最多只能添加8个途经地"
                    });
                    k.deleting || (k.adding = !0, k.handleIndex = e - 1, C("adding-address", !0), k.handleAddress = (0, 
                    d.default)({}, s.ADDRESS), k.animationItemHeight = 0, (0, i.nextTick)(function() {
                        k.animationItemHeight = A.styles.addressItemHeight;
                    }), setTimeout(function() {
                        t.commit("addAddress"), k.handleIndex = -1, k.adding = !1, k.handleAddress = {}, 
                        C("adding-address", !1), (0, i.nextTick)(function() {
                            K.value(e - 1) && ne(2, e - 1);
                        }), Z();
                    }, 300));
                }
                function Z() {
                    var e, n, a, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1, d = "";
                    d = H.value ? "mainpage" : "confirmpage", (0, u.statistics)("homepage_set_unloading", {
                        page_id: d,
                        module_name: "".concat(1 === t ? "添加" : "删除", "收货地"),
                        vehicle_select_name: null === (e = T.value) || void 0 === e ? void 0 : e.name,
                        vehicle_select_id: null === (n = T.value) || void 0 === n ? void 0 : n.order_vehicle_id,
                        frame_city_id: null === (a = b.value) || void 0 === a ? void 0 : a.city_id,
                        is_denoise: 2,
                        scene_id: A.currentSceneId
                    });
                }
                var ee = (0, v.throttle)(function(e) {
                    if (!A.calculating && "" === k.swapIndex) {
                        var n = f.value[e], a = f.value[e + 1];
                        ne(1, e), n.name && !a.name && e + 1 < f.value.length - 1 && ne(2, e + 1), n.name || e - 1 >= 0 && ne(2, e - 1), 
                        0 !== e || a.name || a.city_name || (a = (0, d.default)({}, (0, v.createEmptyAddressFromStart)())), 
                        k.swapIndex = e;
                        var o = W.value(f.value.length - 1);
                        k.clickRotate = !0, setTimeout(function() {
                            t.commit("saveAddress", {
                                index: e,
                                address: a
                            }), t.commit("saveAddress", {
                                index: e + 1,
                                address: n
                            }), k.swapIndex = "";
                            var d = 0 === e && function(e, n) {
                                var a = n.city_id || "", t = e.city_id || "";
                                return Number(a) !== Number(t);
                            }(n, a);
                            d && C("reset-home-data"), (0, i.nextTick)(function() {
                                C("change", {
                                    cityChange: d
                                });
                            }), (0, i.nextTick)(function() {
                                !o && W.value(f.value.length - 1) && function() {
                                    var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
                                    if (1 === Number(e) && !W.value(f.value.length - 1)) return !1;
                                    (0, u.statistics)("mainpage_unloading_rec_view", {
                                        page_id: "mainpage"
                                    });
                                }();
                            }), k.clickRotate = !1;
                        }, k.swapAnimationTime);
                    }
                }, 1e3);
                function ne() {
                    var e, n, a, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1, d = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, i = "";
                    i = H.value ? "mainpage" : "confirmpage", (0, u.statistics)(1 === t ? "homepage_address_exchange_click" : "homepage_address_exchange_show", {
                        page_id: i,
                        button_rank: d + 1,
                        address1_type: 0 === d ? "loading" : 1 === d ? "unloading" : "other",
                        address2_type: d + 1 === 1 ? "unloading" : "other",
                        vehicle_select_name: null === (e = T.value) || void 0 === e ? void 0 : e.name,
                        vehicle_select_id: null === (n = T.value) || void 0 === n ? void 0 : n.order_vehicle_id,
                        frame_city_id: null === (a = b.value) || void 0 === a ? void 0 : a.city_id,
                        business_type: _.value,
                        is_denoise: 2
                    });
                }
                return Object.assign({
                    address: f,
                    data: k,
                    addressBoxHeight: N,
                    animationWrapHeight: E,
                    sliceAddressPrev: M,
                    sliceAddressNext: P,
                    emptyIndex: U,
                    setEmptyLight: j,
                    computedShowCoupon: R,
                    descText: L,
                    computedPointClass: $,
                    swapItemClass: B,
                    hasName: Q,
                    animatedNameText: F,
                    animatedDescText: G,
                    nameText: V,
                    computedShowTag: W,
                    computedShowClear: q,
                    canEditAddress: z,
                    computedShowSwap: K,
                    getCouponTxt: X,
                    closeRecommendTag: function() {
                        t.commit("setState", {
                            hasShowEndAddrTag: !1
                        }), k.closeEndTag = !0;
                    },
                    handleSelectAddress: function(n) {
                        var a, t;
                        if (z.value) {
                            var i = "number" == typeof n ? n : Number(null == n || null === (a = n.currentTarget) || void 0 === a || null === (t = a.dataset) || void 0 === t ? void 0 : t.index);
                            (0, u.statistics)("mainpage1_inputbox_click", (0, d.default)({
                                process: i > 0 ? "unloading" : "loading",
                                page_id: H.value ? "mainpage" : "confirmpage",
                                is_denoise: 2
                            }, S.value));
                            var o = "/pages/address/index?index=".concat(i, "&fromPage=").concat(A.fromPage);
                            if (!y.value) return e.navigateTo({
                                url: "/pages/login/index?redirect=".concat(encodeURIComponent(o))
                            });
                            e.navigateTo({
                                url: o
                            });
                        }
                    },
                    selectTag: function(e) {
                        (0, u.statistics)("mainpage_unloading_rec_click", {
                            page_id: "mainpage"
                        }), t.commit("saveAddress", {
                            index: f.value.length - 1,
                            address: A.otherInfo.addressTag
                        }), C("change");
                    },
                    addAddr: Y,
                    delAddr: function(e) {
                        A.calculating || k.adding || void 0 === e || (k.deleting = !0, k.handleIndex = e, 
                        k.handleAddress = f.value[e], k.animationItemHeight = A.styles.addressItemHeight, 
                        C("deleting-address", e), (0, i.nextTick)(function() {
                            k.animationItemHeight = 0;
                        }), setTimeout(function() {
                            var n;
                            k.handleIndex = -1, k.handleAddress = {}, k.deleting = !1, C("deleting-address", !1);
                            var a = null === (n = f.value[e]) || void 0 === n ? void 0 : n.name;
                            t.commit("removeAddress", e), a && C("change"), Z(2);
                        }, 300));
                    },
                    handleSwap: ee,
                    goAddressBook: function(n) {
                        (0, u.statistics)(H.value ? "mainpage_address_book_click" : "orderconfirm_address_book_click");
                        var a = "/pages/address-book/index?index=".concat(n, "&fromPage=").concat(A.fromPage);
                        if (!y.value) return e.navigateTo({
                            url: "/pages/login/index?redirect=".concat(encodeURIComponent(a))
                        });
                        e.navigateTo({
                            url: a
                        });
                    }
                }, {
                    addAddr: Y
                });
            };
            var f = h;
            n.default = f;
        }).call(this, a("543d").default);
    },
    f276: function(e, n, a) {
        a.r(n);
        var t = a("917a"), d = a("8feb");
        for (var i in d) [ "default" ].indexOf(i) < 0 && function(e) {
            a.d(n, e, function() {
                return d[e];
            });
        }(i);
        a("b907");
        var o = a("f0c5"), u = Object(o.a)(d.default, t.b, t.c, !1, null, "0837583a", null, !1, t.a, void 0);
        n.default = u.exports;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "pages/home/components/address-list-all-user/address-box-create-component", {
    "pages/home/components/address-list-all-user/address-box-create-component": function(e, n, a) {
        a("543d").createComponent(a("f276"));
    }
}, [ [ "pages/home/components/address-list-all-user/address-box-create-component" ] ] ]);